import { unix2Moment } from 'src/utils/common';
import Base from './Base';
export default class Message extends Base {
  public id = '';
  public userId = '';
  public userName = '';
  public userAvatar?: string;
  public videoId?: string;
  public videoTitle?: string;
  public audioId?: string;
  public audioLangCode?: string;
  public coverImage?: string;
  public content = '';
  public createTime = 0;
  public type?: MessageType;
  public complimentId?: number;
  public get timeString(): string {
    return unix2Moment(this.createTime).toNow();
  }
}
export enum MessageType {
  UNKNOWN = 0,
  NEW_VIDEO = 1,
  NEW_AUDIO = 2,
  FOLLOWERS = 3,
  LIKE = 5,
  DISLIKE = 6,
  COMPLIMENTS = 7,
  LINKED_AUDIOS = 4,
}
